package cn.nb12.xbox.controller;

import javax.servlet.ServletContext;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.context.MessageSourceAware;
import org.springframework.web.context.ServletContextAware;

import cn.nb12.xbox.utils.ExceptionInfo;

/**
 * 基本controller
 * @author yh
 *
 * @param <T>
 */
public class BaseController implements ServletContextAware,MessageSourceAware{
	protected Logger log=LoggerFactory.getLogger(getClass());
	
	protected ServletContext servletContext;
	
	protected MessageSource messageSource;
	
	@Autowired
	protected ExceptionInfo exceptionInfo;
	
	
	@Override
	public void setServletContext(ServletContext servletContext) {
		this.servletContext=servletContext;
	}
	@Override
	public void setMessageSource(MessageSource messageSource) {
		this.messageSource=messageSource;
	}
}
